package com.sun.mybatisplus.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sun.mybatisplus.redis.bean.UserLike;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

/**
 * @Auth: syh
 * @Date: 2021/11/18 9:25
 * @Email: 1014170249@qq.com
 * @Desc: 不在能知，而在能行
 */
@Repository
public interface LikedMapper extends BaseMapper<UserLike> {
    
    Page<UserLike> findByLikedUserIdAndStatus(String likedUserId, Integer code, Pageable pageable);

    Page<UserLike> findByLikedPostIdAndStatus(String likedPostId, Integer code, Pageable pageable);

    UserLike findByLikedUserIdAndLikedPostId(String likedUserId, String likedPostId);
}
